<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="AsyncCommand,nimbus.commands.AsyncCommand,blockUserInteraction,processingMessage,type,dispatchFailure,dispatchSuccess,execute" name="keywords">
<title>nimbus.commands.AsyncCommand</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AsyncCommand - Nimbus';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Nimbus</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?nimbus/commands/AsyncCommand.html&amp;nimbus/commands/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AsyncCommand</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AsyncCommand"); titleBar_setSubNav(false,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">nimbus.commands</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AsyncCommand</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AsyncCommand <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="base/ICommand.html">ICommand</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../commands/ParallelCommand.html">ParallelCommand</a>, <a href="../commands/SequenceCommand.html">SequenceCommand</a></td>
</tr>
</table>
<p></p>
  The command base to be used for handling asynchronous operations. One example is a call to a
  remote server. Such a command must wait for the call to be processed by the server and 
  returned before the command is complete.  In order for other portions of the application
  (including the controller) to know when execution is complete, the extending class must
  call dispatchSuccess() or dispatchFailure(), which will in turn dispatch an ExecutionEvent.
  
  <p>This class also serves as the base class for ParallelCommand and SequenceCommand.</p>
  
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../commands/ParallelCommand.html" target="">nimbus.commands.ParallelCommand</a>
<br>
<a href="../commands/SequenceCommand.html" target="">nimbus.commands.SequenceCommand</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#blockUserInteraction">blockUserInteraction</a> : Boolean = false<div class="summaryTableDescription">
   Whether to block user interaction while the command is executing.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#processingMessage">processingMessage</a> : String<div class="summaryTableDescription">
   The processing message to be used as feedback to the user while the command is
   executing.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#type">type</a> : String<div class="summaryTableDescription">
   
   The type string is used as a reference for a command execution.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AsyncCommand()">AsyncCommand</a>()</div>
<div class="summaryTableDescription">
   Constructor.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#execute()">execute</a>():void</div>
<div class="summaryTableDescription">
   
   Called when a command is executed by the controller.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dispatchFailure()">dispatchFailure</a>():void</div>
<div class="summaryTableDescription">
   Called by the extending class once the command has completed executing but a failure
   has been reached.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dispatchSuccess()">dispatchSuccess</a>():void</div>
<div class="summaryTableDescription">
   Called by the extending class once the command has completed executing successfully.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:executionComplete">executionComplete</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched after the command is complete.</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:processingMessageChanged">processingMessageChanged</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched each time the processing message property value changes.</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="blockUserInteraction"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">blockUserInteraction</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var blockUserInteraction:Boolean = false</code><p>
   Whether to block user interaction while the command is executing.
   
   </p><p>The default value is <code>false</code>.</p>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../nimbus/Controller.html#deriveInteractionBlocking()" target="">nimbus.Controller.deriveInteractionBlocking()</a>
</div>
</div>
<a name="processingMessage"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">processingMessage</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>processingMessage:String</code>&nbsp;&nbsp;[read-write]<p>
   The processing message to be used as feedback to the user while the command is
   executing.
   
   </p><p>The default value is <code>null</code>.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get processingMessage():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set processingMessage(value:String):void</code>
<br>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../nimbus/Controller.html#deriveProcessingMessage" target="">nimbus.Controller.deriveProcessingMessage</a>
<br>
<a href="../events/ProcessingMessageEvent.html" target="">nimbus.events.ProcessingMessageEvent</a>
</div>
</div>
<a name="type"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">type</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>type:String</code>&nbsp;&nbsp;[read-write]<p>
   
   The type string is used as a reference for a command execution.  This is set through
   Controller.execCommand() when executing a command.  Once the command has been executed,
   and ExecutionEvent is dispatched with this string as its event tpe.  Other portions
   of the application that would like to know when commands of the same type are dispatched
   can listen to such events by adding an event listener to the controller for the given
   type.
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get type():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set type(value:String):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AsyncCommand()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AsyncCommand</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AsyncCommand()</code><p>
   Constructor.
   </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="dispatchFailure()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dispatchFailure</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function dispatchFailure():void</code><p>
   Called by the extending class once the command has completed executing but a failure
   has been reached. This dispatches an ExecutionEvent which notifies the controller that 
   the command has finished executing.
   </p></div>
<a name="dispatchSuccess()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dispatchSuccess</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function dispatchSuccess():void</code><p>
   Called by the extending class once the command has completed executing successfully.
   This dispatches an ExecutionEvent which notifies the controller that the command
   has finished executing.
   </p></div>
<a name="execute()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">execute</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function execute():void</code><p>
   
   Called when a command is executed by the controller.
   
   </p></div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:executionComplete"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">executionComplete</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../events/ExecutionEvent.html"><code>nimbus.events.ExecutionEvent</code></a>
<br>
<p></p><p>
  Dispatched after the command is complete.  The extending class must dictate when the command
  is complete by calling dispatchSuccess() or dispatchFailure(), which will in turn dispatch
  the ExecutionEvent and notify the controller.
  </p></div>
<a name="event:processingMessageChanged"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">processingMessageChanged</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../events/ProcessingMessageEvent.html"><code>nimbus.events.ProcessingMessageEvent</code></a>
<br>
<p></p><p>
  Dispatched each time the processing message property value changes.
  </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
